package cn.xyfmzmy.composite.express;

public class Main {
    public static void main(String[] args) {
        // 1 + 2*3 - 6/2
        MultiplyExperssion twoMulThree = new MultiplyExperssion(new NumberExperssion(2), new NumberExperssion(3));
        DevisionExperssion sixDivTwo = new DevisionExperssion(new NumberExperssion(6), new NumberExperssion(2));
        AddExperssion oneAddTwoMulThree = new AddExperssion(new NumberExperssion(1), twoMulThree);
        SubExperssion result = new SubExperssion(oneAddTwoMulThree, sixDivTwo);
        System.out.println(result.getValue());

    }
}
